package com.demo.springbooot_demo.service;

import com.demo.springbooot_demo.pojo.ResponseMessage;
import com.demo.springbooot_demo.pojo.User;
import com.demo.springbooot_demo.pojo.dto.LoginUserDto;
import com.demo.springbooot_demo.pojo.dto.UserDto;

public interface IUserService {

    /*
    插入用户
     */
    User add(UserDto user);

    /**
     * 通过Id获取用户
     * @param userId 用户Id
     */
    User getUser(Integer userId);

    User edit(UserDto user);

    void delete(Integer userId);

    User findByUserName(String username);

    ResponseMessage login(LoginUserDto user);

    ResponseMessage logout();
}
